<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>养殖投入品库存</title>
    <link rel="stylesheet" href="../../../../public/dist/css/layui.css">
    <link rel="stylesheet" href="../../../../public/font/iconfont.css">
    <link rel="stylesheet" href="../../../../css/twocss/commit.css">
</head>

<body>
    <form class="layui-form" action="">
        <div class="select common">
            <div class="select-title">查询条件</div>

            <div class="select-con">


              
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">投入品名称:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" search-type="inputsname" id="inputsname">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:80px;">投入品类别:</label>
                        <div class="layui-input-inline">

                            <select name="inputstype" lay-verify="" id='inputstype' search-type="inputstype">
                                <option value="">请选择</option>
                                <option value="兽药">兽药</option>
                                <option value="饲料">饲料</option>
                                <option value="饲料添加剂">饲料添加剂</option>
                                <option value="其他投入品">其他投入品</option>

                            </select>
                        </div>
                    </div>
                </div>
                
                <div class="select-btn">
                        <div class="layui-bg-green comquery" lay-event="search">查询</div>
                        <div class="layui-bg-green comquery" lay-event="reset">重置</div>
                    </div>
            </div>

        </div>
    </form>

    <div class="common-padding">
        <table class="layui-hide" id="testdome" lay-filter="testdome"></table>
    </div>

</body>
<!-- 头部 -->
<script type="text/html" id="toolbarinter">
    <div class="layui-btn-container ">
        <button class="layui-btn  layui-btn-sm colors" lay-event="add"><i class="layui-icon"></i></i>添加</button>
        <button class="layui-btn  layui-btn-sm colors" lay-event="update"><i class="layui-icon"></i>编辑</button>
        <button class="layui-btn  layui-btn-sm colors" lay-event="delete"><i class="layui-icon"></i>删除</button>
    </div>
</script>

<!-- 里面的查看 -->
<script type="text/html" id="More">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
<script src="../../../../js/common/jquery.min.js"></script>
<script src="../../../../js/common/api.js"></script>
<script src="../../../../public/dist/layui.js" charset="utf-8"></script>
<script src="../../../../js/common/template-web.js"></script>
<script>
        layui.config({
            base: '../../../../js/module/'
        }).use(['Services','jquery'],function () {
            var $  = layui.jquery;
           
            var dataType = 'enterinventory';
            var services = new layui.Services({
                baseURL:baseaip,
                tableId:"testdome",
                toolbar:"#toolbarinter",
                serachUrl:"dictionaries/query",
                getUrl:"dictionaries/get",
                delUrl:"dictionaries/delete",
                updUrl:"plant/updateNcpxx",
                saveUrl:"./dialog/farminginventoryDialog.html",
                deleteField:"id",
                dataType:dataType,
                parameter:{
                    keyword:'',
                    type:dataType
                },
                cols:[[
                    {type: 'checkbox', fixed: 'left'},
                    {field: 'inputstype', sort: true, title: '投入品类别',templet:function (data) {
    
                        return (JSON.parse(data.context)).inputstype
                    }},
                    {field: 'inputsname', sort: true, title: '投入品名称',templet:function (data) {
    
                            return (JSON.parse(data.context)).inputsname
                     }},
                    {field: 'inventnumber', sort: true, title: '库存数量',templet:function (data) {
                        
                        return (JSON.parse(data.context)).inventnumber
                    }},
                    {field: 'date', sort: true, title: '末次采购日期',templet:function (data) {
                        
                        return (JSON.parse(data.context)).date
                    }},
                    {field: 'pronumber', sort: true, title: '末次采购数量',templet:function (data) {
                        
                        return (JSON.parse(data.context)).pronumber
                    }},
                    {field: 'inputnumber', sort: true, title: '末次投放数量',templet:function (data) {
                        
                        return (JSON.parse(data.context)).inputnumber
                    }},
                    {field: 'date2', sort: true, title: '末次投放日期',templet:function (data) {
                        
                        return (JSON.parse(data.context)).date2
                    }},
                   
                ]],
            });
        });
    </script>
</html>